<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<script
	src="${pageContext.request.contextPath}/resources/js/Lead/Create.js"></script>
<div id="content" class="span10">
	<!-- content starts -->

	<div>
		<ul class="breadcrumb">
			<li><a href="#">Home</a> <span class="divider">/</span></li>
			<li><a href="#">Leads</a> <span class="divider">/</span></li>
			<li><a href="#">New Lead</a></li>
		</ul>
	</div>

	<div class="row-fluid sortable">
		<div class="box span12">
			<div class="box-header well" data-original-title>
				<h2>
					<fmt:message key="form.newlead.title" />
				</h2>
				<div class="box-icon">
					<a href="#" class="btn btn-minimize btn-round"><i
						class="icon-chevron-up"></i></a>
				</div>
			</div>
			<div class="box-content">

				<div id="formsContent">
					<!-- Form container -->
					<form:form id="leadForm" commandName="leadDTO"
						class="form-horizontal" autocomplete="off" method="POST" action="">
						<div class="row-fluid">
							<div class="span12">
								<fieldset>
									<legend>
										<fmt:message key="form.lead.requiredinformation" />
									</legend>
									<div class="row-fluid">
										<div class="span6 bgcolor">
											<div class="control-group">
												<label class="control-label" for="input"><fmt:message
														key="form.lead.fName" /> <span style="color: red;">*</span></label>
												<div class="controls">
													<form:input path="fName" id="fName" name="fName" value=""
														maxlength="100" placeholder="" class="required" />
													<label><span class="help-inline"></span></label>
												</div>
											</div>
										</div>
										<div class="span6 bgcolor">
											<div class="control-group">
												<label class="control-label" for="input"><fmt:message
														key="form.lead.company" /> <span style="color: red;">*</span></label>
												<div class="controls">
													<form:input path="companyName" id="companyName"
														name="companyName" value="" maxlength="100" placeholder=""
														class="required" />
													<label><span class="help-inline"></span></label>
												</div>
											</div>
										</div>
									</div>
									<div class="row-fluid">
										<div class="span6 bgcolor">
											<div class="control-group">
												<label class="control-label" for="input"><fmt:message
														key="form.lead.lName" /></label>
												<div class="controls">
													<form:input path="lName" id="lName" name="lName" value=""
														maxlength="100" placeholder="" />
													<label><span class="help-inline"></span></label>
												</div>
											</div>
										</div>
										<div class="span6 bgcolor">
											<div class="control-group">
												<label class="control-label" for="input"><fmt:message
														key="form.lead.leadStatus" /></label>
												<div class="controls">
													<form:select path="leadStatus" id="leadStatus"
														name="leadStatus">
														<c:forEach items="${leadStatus}" varStatus="leadStat">
															<form:option value="${leadStat.index}">${leadStatus[leadStat.index].name}</form:option>
														</c:forEach>
													</form:select>
													<label><span class="help-inline"></span></label>
												</div>
											</div>
										</div>
									</div>
								</fieldset>

								<fieldset>
									<legend>
										<fmt:message key="form.lead.leadinformation" />
									</legend>
									<div class="row-fluid">
										<div class="span6 bgcolor">
											<div class="control-group">
												<label class="control-label" for="input"><fmt:message
														key="form.lead.title" /></label>
												<div class="controls">
													<form:input path="title" id="title" name="title" value=""
														maxlength="100" placeholder="" />
													<label><span class="help-inline"></span></label>
												</div>
											</div>
										</div>
										<div class="span6 bgcolor">
											<div class="control-group">
												<label class="control-label" for="input"><fmt:message
														key="form.lead.email" /></label>
												<div class="controls">
													<form:input path="email" id="email" name="email" value=""
														maxlength="100" placeholder="" />
													<label><span class="help-inline"></span></label>
												</div>
											</div>
										</div>
									</div>
									<div class="row-fluid">
										<div class="span6 bgcolor">
											<div class="control-group">
												<label class="control-label" for="input"><fmt:message
														key="form.lead.phone" /> <span style="color: red;">*</span></label>
												<div class="controls">
													<form:input path="phone" id="phone" name="phone" value=""
														maxlength="100" placeholder="" class="required" />
													<label><span class="help-inline"></span></label>
												</div>
											</div>
										</div>
										<div class="span6 bgcolor">
											<div class="control-group">
												<label class="control-label" for="input"><fmt:message
														key="form.lead.rating" /></label>
												<div class="controls">
													<form:select path="rating" id="rating" name="rating">
														<c:forEach items="${ratings}" varStatus="rating">
															<option value="${rating.index}">${ratings[rating.index].name}</option>
														</c:forEach>
													</form:select>
													<label><span class="help-inline"></span></label>
												</div>
											</div>
										</div>
									</div>
									<div class="row-fluid">
										<div class="span6 bgcolor">
											<div class="control-group">
												<label class="control-label" for="input"><fmt:message
														key="form.lead.mobile" /></label>
												<div class="controls">
													<form:input path="mobile" id="mobile" name="mobile"
														value="" maxlength="100" placeholder="" />
													<label><span class="help-inline"></span></label>
												</div>
											</div>
										</div>
										<div class="span6 bgcolor">
											<div class="control-group">
												<label class="control-label" for="input"><fmt:message
														key="form.lead.sector" /></label>
												<div class="controls">
													<form:input path="industry" id="sector" name="sector"
														value="" maxlength="100" placeholder="" />
													<label><span class="help-inline"></span></label>
												</div>
											</div>
										</div>
									</div>
								</fieldset>
								<fieldset>
									<legend>
										<fmt:message key="form.lead.addressinformation" />
									</legend>
									<div class="row-fluid">
										<div class="span6 bgcolor">
											<div class="control-group">
												<label class="control-label" for="input"><fmt:message
														key="form.lead.street" /></label>
												<div class="controls">
													<form:input path="street" id="street" name="street"
														value="" maxlength="100" placeholder="" />
													<label><span class="help-inline"></span></label>
												</div>
											</div>
										</div>
										<div class="span6 bgcolor">
											<div class="control-group">
												<label class="control-label" for="input"><fmt:message
														key="form.lead.zipCode" /></label>
												<div class="controls">
													<form:input path="zipCode" id="zipCode" name="zipCode"
														value="" maxlength="100" placeholder="" />
													<label><span class="help-inline"></span></label>
												</div>
											</div>
										</div>
									</div>
									<div class="row-fluid">
										<div class="span6 bgcolor">
											<div class="control-group">
												<label class="control-label" for="input"><fmt:message
														key="form.lead.city" /></label>
												<div class="controls">
													<form:select path="cityDTO.id" id="city" name="city">
														<option value="0">--none--</option>
													</form:select>
													<label><span class="help-inline"></span></label>
												</div>
											</div>
										</div>
										<div class="span6 bgcolor">
											<div class="control-group">
												<label class="control-label" for="input"><fmt:message
														key="form.lead.country" /></label>
												<div class="controls">
													<form:select path="countryDTO.id" id="country"
														name="country" onchange="getAjaxCities();">
														<c:forEach items="${countries}" var="country">
															<option value="${country.id}">${country.countryName}</option>
														</c:forEach>
													</form:select>
													<label><span class="help-inline"></span></label>
												</div>
											</div>
										</div>
									</div>
									<div class="row-fluid">
										<div class="span6 bgcolor">
											<div class="control-group">
												<label class="control-label" for="input"><fmt:message
														key="form.lead.area" /></label>
												<div class="controls">
													<form:input path="state" id="area" name="area" value=""
														maxlength="100" placeholder="" />
													<label><span class="help-inline"></span></label>
												</div>
											</div>
										</div>
										<div class="span6 bgcolor">
											<div class="control-group">
												<label class="control-label" for="input"><fmt:message
														key="form.lead.website" /></label>
												<div class="controls">
													<form:input path="webSite" id="website" name="website"
														value="" maxlength="100" placeholder="" />
													<label><span class="help-inline"></span></label>
												</div>
											</div>
										</div>
									</div>
								</fieldset>
								<fieldset>
									<legend>
										<fmt:message key="form.lead.additionalinformation" />
									</legend>
									<div class="row-fluid">
										<div class="span6 bgcolor">
											<div class="control-group">
												<label class="control-label" for="input"><fmt:message
														key="form.lead.inOutBound" /></label>
												<div class="controls">
													<label class="radio inline"> <form:radiobutton
															path="inOutBound" id="inOutBound" name="inOutBound"
															value="In Bound" /> <fmt:message key="form.lead.inBound" />
													</label> <label class="radio inline"> <form:radiobutton
															path="inOutBound" id="inOutBound" name="inOutBound"
															value="Out Bound" /> <fmt:message
															key="form.lead.outBound" />
													</label> <label><span class="help-inline"></span></label>
												</div>
											</div>
										</div>
										<div class="span6 bgcolor">
											<div class="control-group">
												<label class="control-label" for="input"><fmt:message
														key="form.lead.empNum" /></label>
												<div class="controls">
													<form:input path="numOfEmp" id="numOfEmp"
														value="" maxlength="100" placeholder="" />
													<label><span class="help-inline"></span></label>
												</div>
											</div>
										</div>
									</div>
									<div class="row-fluid">
										<div class="span6 bgcolor">
											<div class="control-group">
												<label class="control-label" for="input"><fmt:message
														key="form.lead.needAmount" /></label>
												<div class="controls">
													<form:input path="carsNum" id="carsNum"
														name="carsNum" value="" maxlength="100" />
													<label><span class="help-inline"></span></label>
												</div>
											</div>
										</div>
										<div class="span6 bgcolor">
											<div class="control-group">
												<label class="control-label" for="input"><fmt:message
														key="form.lead.annualRevenue" /></label>
												<div class="controls">
													<form:input path="annualRevenue" id="annualRevenue"
														name="annualRevenue" value="" maxlength="100"
														placeholder="" />
													<label><span class="help-inline"></span></label>
												</div>
											</div>
										</div>
									</div>
									<div class="row-fluid">
										<div class="span6 bgcolor">
											<div class="control-group">
												<label class="control-label" for="input"><fmt:message
														key="form.lead.category" /></label>
												<div class="controls">
													<label class="radio inline"> <form:radiobutton
															path="category" id="category" name="category"
															value="Individual" /> <fmt:message
															key="form.lead.individual" />
													</label> <label class="radio inline"> <form:radiobutton
															path="category" id="category" name="category"
															value="Corporate" /> <fmt:message
															key="form.lead.corporate" />
													</label> <label><span class="help-inline"></span></label>
												</div>
											</div>
										</div>
										<div class="span6 bgcolor">
											<div class="control-group">
												<label class="control-label" for="input"><fmt:message
														key="form.lead.leadsource" /></label>
												<div class="controls">
													<form:input path="leadSource" id="leadsource"
														name="leadsource" value="" maxlength="100" placeholder="" />
													<label><span class="help-inline"></span></label>
												</div>
											</div>
										</div>
									</div>
									<div class="row-fluid">
										<div class="span12 bgcolor">
											<div class="control-group">
												<label class="control-label" for="input"><fmt:message
														key="form.lead.description" /></label>
												<div class="controls">
													<form:textarea path="description" rows="5"
														class="input-xxlarge" id="description" name="description"></form:textarea>
													<label><span class="help-inline"></span></label>
												</div>
											</div>
										</div>
									</div>
								</fieldset>
							</div>
						</div>
						<div class="form-actions">
							<button id="saveButton" type="submit" class="btn btn-primary">
								<fmt:message key="form.lead.btnNewLead" />
							</button>
							<button id="cancelButton" type="button" class="btn">
								<fmt:message key="form.cancel" />
							</button>
						</div>
					</form:form>
				</div>
			</div>
		</div>
		<!--/span-->

	</div>
	<!--/row-->

	<input type="hidden" name="fNameRequired" id="fNameRequired"
		value="<fmt:message key="error.lead.fName"/>" /> <input type="hidden"
		name="companyRequired" id="companyRequired"
		value="<fmt:message key="error.lead.company"/>" /> <input
		type="hidden" name="companyChecked" id="companyChecked"
		value="<fmt:message key="error.lead.checkCompany"/>" /> <input
		type="hidden" name="phoneRequired" id="phoneRequired"
		value="<fmt:message key="error.lead.phone"/>" /> <input type="hidden"
		name="phoneChecked" id="phoneChecked"
		value="<fmt:message key="error.lead.phoneChecked"/>" /> <input
		type="hidden" name="emailEmail" id="emailEmail"
		value="<fmt:message key="error.lead.emailPattern"/>" />
	<!-- content ends -->
</div>
<!--/#content.span10-->
<hr />